//index.js
//movie

Page({

  data: {
    tabIndex: 'hots'
  },

  switch: function (ev) {
    var tabIndex = ev.target.dataset.tabIndex;
    this.setData({
      tabIndex: tabIndex
    });
  }
});